{% load ietf_filters session_filters origin %}
{% if not session.past_cutoff_date %}
    {% origin %}
    {% with gt=session.group.type_id %}
        {%comment%}
                <a class="btn btn-primary btn-sm"
                   href="{% url 'ietf.meeting.views.session_details' num=session.meeting.number acronym=session.group.acronym %}{% if gt == 'wg' or gt == 'rg' or gt == 'ag' %}{% else %}#session_{{session.pk}}{% endif %}">Edit</a>
        {% endcomment %}
        <a class="btn btn-primary btn-sm" href="{% url 'ietf.meeting.views.session_details' num=session.meeting.number acronym=session.group.acronym %}{% if gt == 'wg' or gt == 'rg' or gt == 'ag' or gt == 'rag' %}{% else %}#session_{{ session.pk }}{% endif %}">
            Edit materials
        </a>
    {% endwith %}
{% endif %}